import os
from tqdm import tqdm

# 设置源文件夹
src_folder = 'F:\\items\\bike-model\\搜集的数据集\\解压后\\archive(1)\\dataset\\zzxa3'

# 设置待删除文件前缀名列表
to_del_list = ['0008', '0009', '0014', '0015', '0016', '0017', '0018', '0019', '0026', '0027', '0028', '0058', '0059',
               '0060', '0061', '0120', '0160', '0161', '0193', '0194']

for file_name in tqdm(os.listdir(src_folder)):
    if file_name.split('.')[0] in to_del_list:
        os.remove(os.path.join(src_folder, file_name))
        print('已删除：' + file_name)
